<template>
  <div id="basicLayout">
    <!-- 这里是基础布局的内容 -->
    <a-layout>
      <a-layout-header class="header">
        <GlobalHeader />
      </a-layout-header>
      <a-layout-content class="content">
        <router-view />
      </a-layout-content>
      <a-layout-footer class="footer">
        <a href="http://baidu.com" target="_blank"> 编程导航 by 道行vue </a>
      </a-layout-footer>
    </a-layout>
  </div>
</template>

<script setup lang="ts">
import GlobalHeader from '../components/GlobalHeader.vue'
//测试获取当前用户
// import { getCurrentUser } from '@/api/user.ts'
// getCurrentUser().then((res) => {
//   console.log(res)
// })
</script>

<style scoped>
/* 这里可以编写样式 */

#basicLayout .header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: white;
}

#basicLayout .content {
  padding: 20px;
  margin-bottom: 20px;
  margin-top: 84px;
  width: 100%;
  background: white;
}

#basicLayout .footer {
  background: #efefef;
  text-align: center;
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  padding: 16px;
}
</style>
